package bmatch.tech.hello.dao.buider;

import org.apache.ibatis.jdbc.SQL;

/**
 * UserSqlBuider的注释
 *
 * @author: Awake
 * @date: 2018-12-13 21:17
 **/
public class UserSqlBuider {
    public String buildQueryUser(String name, String pwd) {
        return new SQL() {
            {
                SELECT(
                        "user_id as userId,name,pwd");
                FROM("user");
                WHERE("name = #{name}");
                WHERE("pwd = #{pwd}");
                ORDER_BY("user_id");
            }
        }.toString();
    }
}
